﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Joyintech.BLL.inpiao365;
using Joyintech.Model.inpiao365;

namespace Joyintech.Web.inpiao365.UserCenter
{
    public partial class Cms_IsLogin : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!this.IsPostBack)
            {
                //获取当前登录用户
                customer currentCustomer = customer_BLL.GetInstance().GetCurrentCustomer();

                if (currentCustomer != null)
                {
                    if (currentCustomer.CustomerRealName != null && currentCustomer.CustomerRealName != "")
                    {
                        this.litMessage.Text = "你好，" + currentCustomer.CustomerRealName + "欢迎访问影票365！<a href=\"/LoginOut.aspx\">[退出]</a>";
                    }
                    else
                    {
                        this.litMessage.Text = "你好，" + currentCustomer.CustomerName + "欢迎访问影票365！<a href=\"/LoginOut.aspx\">[退出]</a>";
                    }
                }
                else
                {
                    this.litMessage.Text = "你好，欢迎访问影票365！<a href=\"javascript:userlogin()\" style=\"color:#f00;\">[请登录]</a> 或 <a href=\"javascript:userreg()\" style=\"color:#f00;\">[免费注册]</a>";
                }
            }
        }
    }
}